package com.yc.navy.goods.service.lmpl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yc.navy.goods.bean.FoodPrintInfo;
import com.yc.navy.goods.mapper.IFoodPrintMapper;
import com.yc.navy.goods.service.IFoodPrintService;
import com.yc.navy.goods.util.StringUtil;

@Service
public class FoodPrintInfoService implements IFoodPrintService {
	@Autowired
	private IFoodPrintMapper foodPrintMapper;

	@Override
	public Integer add(FoodPrintInfo foot) {
		if(StringUtil.checkNull(String.valueOf(foot.getPid()))) {
			return -1;
		}
		return foodPrintMapper.add(foot);
	}

	@Override
	public List<FoodPrintInfo> find(FoodPrintInfo foot) {
		if(StringUtil.checkNull(String.valueOf(foot.getMid()))) {
			return null;
		}
		return foodPrintMapper.find(foot);
	}

	@Override
	public Integer check(FoodPrintInfo foot) {
		if(StringUtil.checkNull(String.valueOf(foot.getMid()),String.valueOf(foot.getPid()))) {
			return -1;
		}
		return foodPrintMapper.check(foot);
	}

}
